package com.ruoyi.common.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.RandomUtil;

/**
 * 生成ID
 * @author zhoudong
 */
public class IdUtils {
    private static Snowflake snowflake;
    static {
        snowflake = IdUtil.getSnowflake(1, 1);
    }
    /**
     * 生成ID
     * @return
     */
    public static long getId() {
        return snowflake.nextId();
    }
}
